//============================================================================
// Name        : problem121.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <vector>

using namespace std;

long int sumUp(int start, int end) {
	return (end - start +1)*(end + start)/2;
}

long int recursion(int start, int end, int length) {
	length--;
	if (length == 0) {
		return sumUp(start, end);
	}
	long int result = 0;
	for (int i = start; i < 15; i++) {
		result += i*recursion(i+1, end, length);
	}
	return result;
}

unsigned long long factorial(int n) {
	unsigned long long result = 1;
	for(int i = 2; i<=n; i++)
		result *= i;
	return result;
}
int main() {
	long int total = 1;
	for (int i = 2; i < 8; i++) {
		total += recursion(1, 15, i);
	}
	unsigned long long  x = factorial(16);
	cout<<x/total<<endl;

	return 0;
}
